#pragma once

#include "libs.h"


class MyWindow
{
public:
	MyWindow();
	~MyWindow();

public:
	void Init(string title = "window");
	void Quit();
	void Draw(SDL_Texture* tex, SDL_Rect &dstRect, SDL_Rect *clip = nullptr, float angle = 0.0, int xPivot = 0, int yPivot = 0, SDL_RendererFlip flip = SDL_FLIP_NONE);
	SDL_Texture* LoadImage(string file);
	SDL_Texture* RenderText(string message, string fontFile, SDL_Color color, int fontSize);
	void Clear();
	void Present();
	SDL_Rect Box();
private:
	unique_ptr<SDL_Window, void(*)(SDL_Window*)> m_Window
		= unique_ptr<SDL_Window, void(*)(SDL_Window*)>(nullptr, SDL_DestroyWindow);
	unique_ptr<SDL_Renderer, void(*)(SDL_Renderer*)> m_Renderer
		= unique_ptr<SDL_Renderer,void(*)(SDL_Renderer*)>(nullptr, SDL_DestroyRenderer);
	//SDL_Window* m_Window;
	//SDL_Renderer* m_Renderer;
	SDL_Rect m_Box;
};

